home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Fatted Calf
/
The Fatted Calf.iso
/
Applications
/
Communication
/
NGService
/
Source
/
MMFolderCell.m
< prev
next >
Wrap
Text File
|
1993-09-02
|
933b
|
47 lines
/*
* You may freely copy, distribute and reuse the code
* in this example. Scott Anguish disclaims any warranty of
* any kind, expressed or implied, as to its fitness
* for any particular use.
* Please keep this notice intact
* Written by: Scott Anguish sanguish@digifix.com
*/
#import "MMFolderCell.h"
#import <libc.h> /* MAXPATHLEN */
#import <stdio.h>
#import <strings.h>
#import <appkit/appkit.h>
#import <streams/streams.h>
@implementation MMFolderCell:MMCell
- imageFromFilename:(const char *)filename
{
if (!theImage)
{
theImage=[[Application workspace] getIconForFile:filename];
if (!theImage){
theImage = [[NXImage alloc] initFromFile: "/usr/lib/nib/folder_nib.tiff" ];
}
} return self;
}
- imageFromAttachment
{
char filename[MAXPATHLEN+1];
sprintf(filename,"/tmp/%s",attachmentName);
[self imageFromFilename:filename];
return self;
}
@end